package com.xxg.renrensearch.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 分类Dao
 *
 * @author xuxiaogang
 * @date 2021-11-26
 */
@Mapper
@Component
public interface RenrenShopGoodsCategoryDao {
    /**
     * 查询店铺的商品分类信息
     *
     * @param shopId 店铺ID
     * @return 结果
     */
    @Select("select id,display_order as displayOrder,parent_id as parentId,level,name,thumb,status," +
            "is_recommand as isRecommand,advurl,advimg from renren_shop_goods_category where shop_id=#{shopId}")
    List<RenrenShopGoodsCategory> selectByShopId(@Param("shopId") Integer shopId);
}